<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- React 核心库、 -->
    <script src="lib/react/react.development.js"></script>
    <!-- 操作 DOM 的 react 扩展库、 -->
    <script src="lib/react/react-dom.development.js"></script>
    <!-- 将 jsx 转为 js 的 babel 库 -->
    <script src="lib/babel.min.js"></script>
  </head>
  <body>
    <!-- 创建react解析的容器 -->
    <div id="xiaojin"></div>
    <script type="text/babel">
      var msg = "I am xiaojin!!!";
      //1.创建虚拟DOM
      const VDOM = (
        /* 此处一定不要写引号，因为不是字符串 */
        <h1 id="title">
          <span>Hello,{msg}</span>
        </h1>
      );
      //2.渲染虚拟DOM到页面
      ReactDOM.render(VDOM, document.getElementById("xiaojin"));
    </script>
  </body>
</html>
